<%@ taglib prefix="s" uri="/struts-tags" %>

<nav class="navbar navbar-inverse"  role="navigation">
  <div class="container-fluid">

    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="<s:url />">
      	<img src="<s:property value="#url"/>images/logo.png" alt="Bobby">
      </a>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    	
      <ul class="nav navbar-nav">
      
      	<s:set var="menuPrincipal" value="{'inicio','servicios','contacto'}" />
      	<s:iterator value="menuPrincipal">
      	
 			<s:set var="action"><s:property/></s:set>
 			<s:url action="%{action}" var="pageURL" includeParams="get" namespace="/">
    			<s:param name="pagina"><s:property/></s:param>
			</s:url>
			
			<s:if test="#parameters.pagina[0] == #action">
				<li class="active"><s:property/></li>
			</s:if>
			<s:else>
				<li><s:a href="%{pageURL}"><s:property/></s:a></li>
			</s:else>		
	
		</s:iterator>     		
      	
      </ul>

      <ul class="nav navbar-nav navbar-right">
		<li>	
	      	<s:url action="access" var="logearse" includeParams="get" namespace="/"/>	
			<s:a href="%{logearse}" cssClass="btn-ingresar">INGRESAR</s:a>
		</li>	
      </ul>
      
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>